﻿<UserControl x:Name="IdInputControl" x:Class="NicoView.View.NicoViewIdInputControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:NicoView.View"
             xmlns:vm="clr-namespace:NicoView.ViewModel"
             DataContext="{Binding NicoViewIdInputViewModel,Mode=OneWay,Source={StaticResource locator}}"
             mc:Ignorable="d" BorderThickness="1" BorderBrush="#FF8B8B8B" Background="White" VerticalAlignment="Center" Loaded="IdInputControl_Loaded">
    

    <Grid Margin="0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="22"/>
        </Grid.ColumnDefinitions>
        <ComboBox x:Name="InputComboBox"   Grid.Column="0" Text="{Binding IdInputEditInitalize, Mode=OneWay, Source={StaticResource resources}}"   ToolTip="生放送番号または生放送のURLを入力してください" IsSynchronizedWithCurrentItem="True" IsEditable="True" BorderBrush="{x:Null}" Background="{x:Null}" BorderThickness="0" ItemsSource="{Binding ConnectSelections}" VerticalAlignment="Top" SelectionChanged="InputComboBox_SelectionChanged"  >

            <ComboBox.ItemTemplate>
                <DataTemplate>

                        <StackPanel>
                            <Image>
                                
                            </Image>
                            <TextBlock Text="{Binding Path=DisplayId}" />
                            <TextBlock Text="{Binding Path=DisplayTitle}"/>
                        </StackPanel>



                </DataTemplate>
            </ComboBox.ItemTemplate>
            
            <ComboBox.InputBindings>
                
                <KeyBinding Key="Return" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ConnectCommand, Mode=OneWay}"/>
            </ComboBox.InputBindings>

        </ComboBox>
        <Button BorderBrush="{x:Null}" Grid.Column="1" Background="#FFFBFBFB" BorderThickness="0" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ConnectCommand, Mode=OneWay}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="16">
            <Image Source="..\Images\接続.PNG"/>
        </Button>
    </Grid>
</UserControl>
